package com.kingdee.eas.basedata.master.material.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.eas.basedata.master.material.MaterialPurchasingInfo;
import com.kingdee.eas.basedata.framework.DataBaseDCollection;
import com.kingdee.eas.basedata.master.material.MaterialCompanyInfoInfo;
import com.kingdee.eas.basedata.master.material.MaterialPlanInfo;
import com.kingdee.eas.framework.CoreBaseCollection;
import com.kingdee.eas.basedata.master.material.MaterialSalesInfo;
import com.kingdee.eas.basedata.master.material.MaterialCollection;
import com.kingdee.bos.util.BOSUuid;
import java.util.List;
import com.kingdee.eas.framework.DataBaseCollection;
import java.lang.String;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.eas.common.EASBizException;
import java.math.BigDecimal;
import java.util.Map;
import java.util.HashMap;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import java.util.Set;
import java.util.HashSet;
import com.kingdee.eas.basedata.framework.app.DataBaseDControllerBean;
import com.kingdee.eas.framework.CoreBaseInfo;
import java.util.ArrayList;
import com.kingdee.eas.framework.ObjectBaseCollection;
import com.kingdee.eas.basedata.master.material.MaterialInventoryInfo;
import com.kingdee.eas.basedata.master.material.MaterialInfo;



public abstract class AbstractMaterialControllerBean extends DataBaseDControllerBean implements MaterialController
{
    protected AbstractMaterialControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("4409E7F0");
    }

    public MaterialInfo getMaterialInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e8adff69-00f9-1000-e000-0036c0a81033"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            MaterialInfo retValue = (MaterialInfo)_getValue(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk);
    }

    public MaterialInfo getMaterialInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e8adff69-00f9-1000-e000-0037c0a81033"), new Object[]{ctx, pk, selector});
            invokeServiceBefore(svcCtx);
            MaterialInfo retValue = (MaterialInfo)_getValue(ctx, pk, selector);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk, selector);
    }

    public MaterialCollection getMaterialCollection(Context ctx) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e8adff69-00f9-1000-e000-003ec0a81033"), new Object[]{ctx});
            invokeServiceBefore(svcCtx);
            MaterialCollection retValue = (MaterialCollection)_getCollection(ctx, svcCtx);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx) throws BOSException
    {
        return super._getCollection(ctx, svcCtx);
    }

    public MaterialCollection getMaterialCollection(Context ctx, EntityViewInfo view) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("e8adff69-00f9-1000-e000-003fc0a81033"), new Object[]{ctx, view});
            invokeServiceBefore(svcCtx);
            MaterialCollection retValue = (MaterialCollection)_getCollection(ctx, svcCtx, view);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, EntityViewInfo view) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, view);
    }

    public void approve(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1809757f-0105-1000-e000-0008c0a812dc"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _approve(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _approve(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void unapprove(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1809757f-0105-1000-e000-0009c0a812dc"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _unapprove(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _unapprove(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void freeze(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1809757f-0105-1000-e000-000ac0a812dc"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _freeze(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _freeze(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void unfreeze(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1809757f-0105-1000-e000-000bc0a812dc"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _unfreeze(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _unfreeze(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void multiUnit(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1809757f-0105-1000-e000-0019c0a812dc"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _multiUnit(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _multiUnit(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void adfunct(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1809757f-0105-1000-e000-0015c0a812dc"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _adfunct(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _adfunct(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void showPicture(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1809757f-0105-1000-e000-0016c0a812dc"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _showPicture(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _showPicture(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public MaterialPurchasingInfo getPurchasingInfo(Context ctx, String matid, String ouid) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("93af0905-0105-1000-e000-0048c0a812dc"), new Object[]{ctx, matid, ouid});
            invokeServiceBefore(svcCtx);
            MaterialPurchasingInfo retValue = (MaterialPurchasingInfo)_getPurchasingInfo(ctx, matid, ouid);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract MaterialPurchasingInfo _getPurchasingInfo(Context ctx, String matid, String ouid) throws BOSException, EASBizException;

    public MaterialSalesInfo getSalesInfo(Context ctx, String matid, String ouid) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("93af0905-0105-1000-e000-0050c0a812dc"), new Object[]{ctx, matid, ouid});
            invokeServiceBefore(svcCtx);
            MaterialSalesInfo retValue = (MaterialSalesInfo)_getSalesInfo(ctx, matid, ouid);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract MaterialSalesInfo _getSalesInfo(Context ctx, String matid, String ouid) throws BOSException, EASBizException;

    public MaterialInventoryInfo getInventoryInfo(Context ctx, String matid, String ouid) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("93af0905-0105-1000-e000-0051c0a812dc"), new Object[]{ctx, matid, ouid});
            invokeServiceBefore(svcCtx);
            MaterialInventoryInfo retValue = (MaterialInventoryInfo)_getInventoryInfo(ctx, matid, ouid);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract MaterialInventoryInfo _getInventoryInfo(Context ctx, String matid, String ouid) throws BOSException, EASBizException;

    public MaterialCompanyInfoInfo getCompanyInfo(Context ctx, String matid, String ouid) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b9233379-0105-1000-e000-0002c0a812c2"), new Object[]{ctx, matid, ouid});
            invokeServiceBefore(svcCtx);
            MaterialCompanyInfoInfo retValue = (MaterialCompanyInfoInfo)_getCompanyInfo(ctx, matid, ouid);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract MaterialCompanyInfoInfo _getCompanyInfo(Context ctx, String matid, String ouid) throws BOSException;

    public void adjustStandardCost(Context ctx, String companyOrgUnitID, String[] materialIDs, BigDecimal[] standartdcost) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("4ecfd886-0107-1000-e000-0003c0a8131f"), new Object[]{ctx, companyOrgUnitID, materialIDs, standartdcost});
            invokeServiceBefore(svcCtx);
            _adjustStandardCost(ctx, companyOrgUnitID, materialIDs, standartdcost);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _adjustStandardCost(Context ctx, String companyOrgUnitID, String[] materialIDs, BigDecimal[] standartdcost) throws BOSException, EASBizException;

    public int mulApproveBase(Context ctx, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("21b3aeb1-0108-1000-e000-0002c0a8131f"), new Object[]{ctx, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulApproveBase(ctx, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulApproveBase(Context ctx, ArrayList idList) throws BOSException, EASBizException;

    public int mulApproveCompany(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("21b3aeb1-0108-1000-e000-0008c0a8131f"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulApproveCompany(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulApproveCompany(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public int mulApprovePurchase(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("21b3aeb1-0108-1000-e000-0009c0a8131f"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulApprovePurchase(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulApprovePurchase(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public int mulApproveSale(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("21b3aeb1-0108-1000-e000-000ac0a8131f"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulApproveSale(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulApproveSale(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public int mulApproveInventory(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("21b3aeb1-0108-1000-e000-000bc0a8131f"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulApproveInventory(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulApproveInventory(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public int mulApproveCost(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("21b3aeb1-0108-1000-e000-000cc0a8131f"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulApproveCost(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulApproveCost(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public void updateCheck(Context ctx, IObjectPK pk, String propertyFieldName, MaterialInfo oldInfo, MaterialInfo newInfo) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("39202424-0109-1000-e000-0001c0a8131f"), new Object[]{ctx, pk, propertyFieldName, oldInfo, newInfo});
            invokeServiceBefore(svcCtx);
            _updateCheck(ctx, pk, propertyFieldName, oldInfo, newInfo);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _updateCheck(Context ctx, IObjectPK pk, String propertyFieldName, MaterialInfo oldInfo, MaterialInfo newInfo) throws BOSException, EASBizException;

    public MaterialCollection getMaterialCollectionByFI(Context ctx, ArrayList materials, String companyID) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("a9d8ca9b-010d-1000-e000-0001c0a81238"), new Object[]{ctx, materials, companyID});
            invokeServiceBefore(svcCtx);
            MaterialCollection retValue = (MaterialCollection)_getMaterialCollectionByFI(ctx, materials, companyID);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectCollection _getMaterialCollectionByFI(Context ctx, ArrayList materials, String companyID) throws BOSException;

    public boolean isBizRef(Context ctx, BOSUuid pk) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("be9afe93-010d-1000-e000-0002c0a81238"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            boolean retValue = (boolean)_isBizRef(ctx, pk);
            svcCtx.setMethodReturnValue(new Boolean(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract boolean _isBizRef(Context ctx, BOSUuid pk) throws BOSException;

    public List getMaterialsExistInvInfo(Context ctx, String[] materialIDs, String inventoryID) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("0fd30af0-0110-1000-e000-0001c0a812c5"), new Object[]{ctx, materialIDs, inventoryID});
            invokeServiceBefore(svcCtx);
            List retValue = (List)_getMaterialsExistInvInfo(ctx, materialIDs, inventoryID);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract List _getMaterialsExistInvInfo(Context ctx, String[] materialIDs, String inventoryID) throws BOSException;

    public Map getMeasureUnitMap(Context ctx, String materialID) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7d816dce-0111-1000-e000-003cc0a812c5"), new Object[]{ctx, materialID});
            invokeServiceBefore(svcCtx);
            Map retValue = (Map)_getMeasureUnitMap(ctx, materialID);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Map _getMeasureUnitMap(Context ctx, String materialID) throws BOSException, EASBizException;

    public HashMap verifyMaterialInvInfos(Context ctx, HashMap hashMap) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("614c5d3b-0116-1000-e000-0002c0a812c5"), new Object[]{ctx, hashMap});
            invokeServiceBefore(svcCtx);
            HashMap retValue = (HashMap)_verifyMaterialInvInfos(ctx, hashMap);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract HashMap _verifyMaterialInvInfos(Context ctx, HashMap hashMap) throws BOSException;

    public int mulUnApproveBase(Context ctx, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("534128fc-0118-1000-e000-0007c0a812c5"), new Object[]{ctx, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulUnApproveBase(ctx, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulUnApproveBase(Context ctx, ArrayList idList) throws BOSException, EASBizException;

    public int mulUnApproveCompany(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("534128fc-0118-1000-e000-0008c0a812c5"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulUnApproveCompany(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulUnApproveCompany(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public int mulUnApprovePurchase(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("534128fc-0118-1000-e000-0009c0a812c5"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulUnApprovePurchase(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulUnApprovePurchase(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public int mulUnApproveSale(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("534128fc-0118-1000-e000-000ac0a812c5"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulUnApproveSale(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulUnApproveSale(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public int mulUnApproveInventory(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("534128fc-0118-1000-e000-000bc0a812c5"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulUnApproveInventory(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulUnApproveInventory(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public int mulUnApproveCost(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("534128fc-0118-1000-e000-000cc0a812c5"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulUnApproveCost(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulUnApproveCost(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public void batchAssign2(Context ctx, String cuid, String[] diddata, String[] cuiddata, HashSet assistData) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("299576bf-011a-1000-e000-0008c0a8125a"), new Object[]{ctx, cuid, diddata, cuiddata, assistData});
            invokeServiceBefore(svcCtx);
            _batchAssign2(ctx, cuid, diddata, cuiddata, assistData);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchAssign2(Context ctx, String cuid, String[] diddata, String[] cuiddata, HashSet assistData) throws BOSException, EASBizException;

    public void batchAssign2(Context ctx, String cuid, String sql, HashSet basedata, HashSet cuData, HashSet assistData) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("299576bf-011a-1000-e000-000fc0a8125a"), new Object[]{ctx, cuid, sql, basedata, cuData, assistData});
            invokeServiceBefore(svcCtx);
            _batchAssign2(ctx, cuid, sql, basedata, cuData, assistData);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchAssign2(Context ctx, String cuid, String sql, HashSet basedata, HashSet cuData, HashSet assistData) throws BOSException, EASBizException;

    public void batchAssignAssist(Context ctx, String cuid, String[] diddata, String[] cuiddata, HashSet assistData) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("2d8fded6-011a-1000-e000-0014c0a8125a"), new Object[]{ctx, cuid, diddata, cuiddata, assistData});
            invokeServiceBefore(svcCtx);
            _batchAssignAssist(ctx, cuid, diddata, cuiddata, assistData);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchAssignAssist(Context ctx, String cuid, String[] diddata, String[] cuiddata, HashSet assistData) throws BOSException, EASBizException;

    public void batchAssignAssist(Context ctx, String cuid, String sql, HashSet basedata, HashSet cuData, HashSet assistData) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("2d8fded6-011a-1000-e000-0015c0a8125a"), new Object[]{ctx, cuid, sql, basedata, cuData, assistData});
            invokeServiceBefore(svcCtx);
            _batchAssignAssist(ctx, cuid, sql, basedata, cuData, assistData);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchAssignAssist(Context ctx, String cuid, String sql, HashSet basedata, HashSet cuData, HashSet assistData) throws BOSException, EASBizException;

    public int mulApprovePlan(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1df30473-39ff-4aae-a6b1-9082de2f06ef"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulApprovePlan(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulApprovePlan(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public int mulUnApprovePlan(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d3c3a3eb-cf77-4b5c-8fbd-604ae132b284"), new Object[]{ctx, ouID, idList});
            invokeServiceBefore(svcCtx);
            int retValue = (int)_mulUnApprovePlan(ctx, ouID, idList);
            svcCtx.setMethodReturnValue(new Integer(retValue));
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract int _mulUnApprovePlan(Context ctx, String ouID, ArrayList idList) throws BOSException, EASBizException;

    public Map transformToTree(Context ctx, Set databaseIDs, int groupLevel) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("11009784-9782-4116-a455-80e674e1a9e6"), new Object[]{ctx, databaseIDs, new Integer(groupLevel)});
            invokeServiceBefore(svcCtx);
            Map retValue = (Map)_transformToTree(ctx, databaseIDs, groupLevel);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Map _transformToTree(Context ctx, Set databaseIDs, int groupLevel) throws BOSException, EASBizException;

    public MaterialPlanInfo getPlanInfo(Context ctx, String matid, String ouid) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("38370bc2-4989-4dcd-9703-6811041fcdd1"), new Object[]{ctx, matid, ouid});
            invokeServiceBefore(svcCtx);
            MaterialPlanInfo retValue = (MaterialPlanInfo)_getPlanInfo(ctx, matid, ouid);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract MaterialPlanInfo _getPlanInfo(Context ctx, String matid, String ouid) throws BOSException, EASBizException;

    public Map getEditUIInitData(Context ctx, String materialID) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("88acc58a-134c-4ab5-a2a3-a24a5a5dfb4b"), new Object[]{ctx, materialID});
            invokeServiceBefore(svcCtx);
            Map retValue = (Map)_getEditUIInitData(ctx, materialID);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Map _getEditUIInitData(Context ctx, String materialID) throws BOSException, EASBizException;

    public void batchUnAssignAssist(Context ctx, String cuId, String[] orgIds, String[] dataIds, HashSet assistDataSet) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("b13203dd-5e0e-4747-a3d6-130a33cd7d64"), new Object[]{ctx, cuId, orgIds, dataIds, assistDataSet});
            invokeServiceBefore(svcCtx);
            _batchUnAssignAssist(ctx, cuId, orgIds, dataIds, assistDataSet);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchUnAssignAssist(Context ctx, String cuId, String[] orgIds, String[] dataIds, HashSet assistDataSet) throws BOSException, EASBizException;

    public void batchUnAssignAssist(Context ctx, String cuId, String[] orgIds, String dataSql, String[] notInDataIds, HashSet assistDataSet) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("0d426814-d349-45e1-ba20-0b25adc98abe"), new Object[]{ctx, cuId, orgIds, dataSql, notInDataIds, assistDataSet});
            invokeServiceBefore(svcCtx);
            _batchUnAssignAssist(ctx, cuId, orgIds, dataSql, notInDataIds, assistDataSet);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _batchUnAssignAssist(Context ctx, String cuId, String[] orgIds, String dataSql, String[] notInDataIds, HashSet assistDataSet) throws BOSException, EASBizException;

    public String readNewNumber(Context ctx, String cuId, MaterialInfo materialInfo) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("f619023f-3906-4512-8343-2d9dbeff1c8b"), new Object[]{ctx, cuId, materialInfo});
            invokeServiceBefore(svcCtx);
            String retValue = (String)_readNewNumber(ctx, cuId, materialInfo);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract String _readNewNumber(Context ctx, String cuId, MaterialInfo materialInfo) throws BOSException, EASBizException;

    public MaterialCollection getMaterialCollection(Context ctx, String oql) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("null"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            MaterialCollection retValue = (MaterialCollection)_getCollection(ctx, svcCtx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, String oql) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, oql);
    }

    public DataBaseDCollection getDataBaseDCollection (Context ctx) throws BOSException
    {
    	return (DataBaseDCollection)(getMaterialCollection(ctx).cast(DataBaseDCollection.class));
    }
    public DataBaseDCollection getDataBaseDCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (DataBaseDCollection)(getMaterialCollection(ctx, view).cast(DataBaseDCollection.class));
    }
    public DataBaseDCollection getDataBaseDCollection (Context ctx, String oql) throws BOSException
    {
    	return (DataBaseDCollection)(getMaterialCollection(ctx, oql).cast(DataBaseDCollection.class));
    }
    public DataBaseCollection getDataBaseCollection (Context ctx) throws BOSException
    {
    	return (DataBaseCollection)(getMaterialCollection(ctx).cast(DataBaseCollection.class));
    }
    public DataBaseCollection getDataBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (DataBaseCollection)(getMaterialCollection(ctx, view).cast(DataBaseCollection.class));
    }
    public DataBaseCollection getDataBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (DataBaseCollection)(getMaterialCollection(ctx, oql).cast(DataBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx) throws BOSException
    {
    	return (ObjectBaseCollection)(getMaterialCollection(ctx).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (ObjectBaseCollection)(getMaterialCollection(ctx, view).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (ObjectBaseCollection)(getMaterialCollection(ctx, oql).cast(ObjectBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBaseCollection)(getMaterialCollection(ctx).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBaseCollection)(getMaterialCollection(ctx, view).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBaseCollection)(getMaterialCollection(ctx, oql).cast(CoreBaseCollection.class));
    }
}